import java.io.IOException;


public class ExpressionGenerator {
    public static void main(String[] args) throws IOException {
        Calculate calculate = new IOCalculate ();
        if (args.length != 3){
            System.err.println("java ExpressionGenerator");
                    System.exit(1);
        }
        int amount = Integer.parseInt(args[0]);
        int level = Integer.parseInt(args[1]);
        if (Integer.parseInt(args[1]) == 0)
            level = 1;
        calculate.Ti(amount,level);
        ((IOCalculate)calculate).inFile(args[2]);
    }
}